package com.rtrj.resource.logic.manager.user.impl;

import java.util.Map;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.rtrj.common.constant.ReturnMessage;
import com.rtrj.resource.data.entity.user.UserEntity;
import com.rtrj.resource.logic.manager.user.UserManager;
import com.rtrj.resource.logic.service.user.UserService;

@Transactional(rollbackFor={Exception.class})
@Component
@Scope("prototype") 
public class UserManagerImpl implements UserManager {
	
	private static final Logger logger = LoggerFactory.getLogger(UserManagerImpl.class);

	@Resource
	private UserService userService;
	
	@Override
	public String UserLoginManager(UserEntity userEntity) throws Exception {
		logger.debug("logger user login manager begin");
		if(null!=userEntity){
			boolean falg = false;
		    falg=userService.UserLoginService(userEntity);
			if(falg){
				return ReturnMessage.SUCCESS;
			}
			
		}
		return null;
	}

	@Override
	public Map<Object,Object> UserListManager(UserEntity userEntity) throws Exception {
		logger.debug("logger user list manager begin");
		
		return null;
	}
	

}
